const { rpush, lrange } = require("../../redis/index");
module.exports = {
    setChatMsg: async function (userId, data) {
        await rpush(userId, JSON.stringify(data))
    },
    getChatMsg: async function (userId) {
        return await lrange(userId, 0, -1)
        //lrange( key, 0, -1 ); 获取所有数据
    }
}